package com.hzsk.lisence.mapper;

import com.hzsk.lisence.entity.*;
import com.hzsk.lisence.entity.query.LisenceServiceQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HardwareMapper {

    Integer saveHardware(HardwareEntity hardwareEntity);

    Integer createHardwareGrouping(HardwareGroupingEntity hardwareGroupingEntity);

    List<HardwareGroupingEntity> selectHardwareGrouping();

    List<HardwareGroupingEntity> selectHardwareGroupingByName(@Param("name")String name);

    List<HardwareEntity> selectHardwareGroupingInfo(LisenceServiceQuery lisenceServiceQuery);

    Integer updateHardwareGrouping(HardwareGroupingEntity hardwareGroupingEntity);

    Integer delHardwareGrouping(@Param("id")Integer id);

    Integer delHardwareGroupingConn(@Param("id")Integer id);

    Integer delConnGroupingByHardwareId(@Param("hardwareId")Integer hardwareId);

    Integer setSoftwareConnGrouping(HardwareConnHardwareGrouping conn);

    List<HardwareEntity>selectHardwareByUserId(LisenceServiceQuery lisenceServiceQuery);

    List<HardwareEntity>selectHardwareByNotIds(List<Integer> ids);


    Integer updateHardware(HardwareEntity hardwareEntity);

    Integer delHardware(@Param("id")Integer id);

    Integer saveConnSoftware(HardwareConnSoftware hardwareConnSoftware);

    Integer delConnSoftware(@Param("hardwareId")Integer hardwareId);

    List<SoftwareEntity> selectSoftwareInfoById(@Param("hardwareId")Integer hardwareId);

    List<HardwareEntity> selectHardwareNameByKey(@Param("hardwareKey")String hardwareKey);

    List<HardwareEntity> selectHardwareNameByName(@Param("hardwareName")String hardwareName);

    List<Integer> selectHardIdsByGroupingId(@Param("id")Integer id);

}
